package com.app.brilliant.language.controller;

import com.app.brilliant.common.api.ApiResult;
import com.app.brilliant.language.util.MessageSourceUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/language")
public class MessageLanguageController {

    @Autowired
    private MessageSourceUtil messageSourceUtil;

    @RequestMapping("/messageLanguage")
    @ApiOperation(value = "中英文提示，Happy every day", notes = "中英文提示，祝大家天天开心", response = ApiResult.class)
    public ApiResult getGameModelUnlockInfo(String language){
        String message = messageSourceUtil.getMessage("HelloEveryone", language,"祝大家天天开心");
        return ApiResult.ok(message);
    }
}
